import axios from './http'

// 登陆
export const userLogin = params => { return axios.post('LoginValidate', params) }
// 发送验证修改密码
export const findPassword = params => { return axios.post('findPassword', params) }
// 首页前30条
export const getOrderList = params => { return axios.post('getMessageListTop30', params) }
// 下拉获取15条数据
export const getMoreOrderList = params => { return axios.post('getMessageListLoad15', params) }
// 订单信息
export const getOrderInfo = params => { return axios.post('orderInfo', params) }
// 删除我发布的信息
export const delOrderInfo = params => { return axios.post('DeleteMessage', params) }
// 删除我申请接单信息
export const delFollows = params => { return axios.post('DeleteFollows', params) }
// 申请接单
export const applyOrder = params => { return axios.post('receiveOrder', params) }
// 账户基础数据
export const getUserInfo = params => { return axios.post('getUserInfo', params) }
// 我发布的信息前15条
export const getPublishOrderList = params => { return axios.post('getUserMessageListTop15', params) }
// 我发布的信息下拉获取
export const getMorePublishOrderList = params => { return axios.post('getUserMessageListLoadTop15', params) }
// 我申请的信息前15条
export const getApplicationOrderList = params => { return axios.post('GetTakeOrderMessage', params) }
// 我申请的接单信息下拉刷新
export const getMoreApplicationOrderList = params => { return axios.post('GetTakeOrderMessageLoad', params) }
// 获取搜索关键字
export const getHistoryKeys = params => { return axios.post('getKeywords', params) }
// 关键字搜索
export const getSearchOrderList = params => { return axios.post('searchMessageListTop15', params) }
// 关键字下拉搜索
export const getMoreSearchOrderList = params => { return axios.post('searchMessageLoadTop15', params) }
// 添加搜索的关键字
export const addHistoryKeys = params => { return axios.post('insertKeywords', params) }
// 获取历史发箱记录内容
export const getHistoryOrderTitleList = params => { return axios.post('getHistoryMessage', params) }
// 发箱
export const publishOrder = params => { return axios.post('insertMesssage', params) }
// 获取用户业务信息
export const getEirList = params => { return axios.post('businessList', params) }
// 接单人列表
export const orderList = params => { return axios.post('orderList', params) }
// 确认接单人
export const updataFollows = params => { return axios.post('UpdataFollows', params) }
// 修改订单状态
export const updateOrderState = params => { return axios.post('updateOrderState', params) }
// 获取用户业务信息
export const getBusinessList = params => { return axios.post('businessList', params) }
// 司机修改业务信息
export const editDriverUpdate = params => { return axios.post('driverUpdate', params) }
// 获取运单所有费用
export const getBusinessFees = params => { return axios.post('driverCostList', params) }
// 提交运单所有费用
export const submitBusinessFees = params => { return axios.post('RequestCostDetail', params) }

/**
 * *********************************聊天********************************
 * */

// 获取聊天联系人
export const getLink = params => { return axios.post('getLinkman', params) }
// 建立好友关系
export const buildFri = params => { return axios.post('buildFriRelation', params) }
// 插入聊天记录
export const insertChat = params => { return axios.post('insertChats', params) }
// 获取聊天记录
export const getChatHistory = params => { return axios.post('getChatsHistory', params) }
// 获取messageId
export const getMessageId = params => { return axios.post('getMessageId', params) }
// 得到历史未读消息列表（前端获取可以通过state=1为未读，state=2为已读）
export const getNoWriteMsg = params => { return axios.post('getNoWriteMsg', params) }
// 获取当前用户和好友的聊天消息
export const getFriChats = params => { return axios.post('getFriChats', params) }
// 将未读消息处理为已读
export const disposeNoWriteMsg = params => { return axios.post('disposeNoWriteMsg', params) }
// 记录用户在线状态
export const updateIsOnline = params => { return axios.post('updateIsOnline', params) }
// 更新聊天时间
export const updChatsTime = params => { return axios.post('updChatsTime', params) }
// 更新聊天数
export const updNoReadNum = params => { return axios.post('updNoReadNum', params) }

/**
 * ****************** 订单 ********************
 * */
// 预录
export const presco = params => { return axios.post('presco', params) }

/**
 * ****************** 钱包 ********************
 * */
// 预录充值记录与消费记录
export const preRecord = params => { return axios.post('preRecord', params) }
